﻿using MiniFox.Components;
using MiniFox.Infrastructure;
using MiniFox.Platform.Applications.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MiniFox.Platform.Applications
{
    /// <summary>
    /// 
    /// </summary>
    [AutoRegister, SpareComponent(typeof(DesktopService))]
    public interface IDesktopService
    {
        /// <summary>
        /// 
        /// </summary>
        SystemUser CurrentSystemUser { get; }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        IEnumerable<SystemApp> GetSystemApps();
        /// <summary>
        /// 
        /// </summary>
        /// <param name="module"></param>
        /// <returns></returns>
        bool CreateShortcut(SystemNavModule module);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="appId"></param>
        /// <returns></returns>
        IEnumerable<ITreeNode> GetMenu(string appId);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="appId"></param>
        /// <returns></returns>
        IEnumerable<ITreeNode> GetNav(string appId);
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        IEnumerable<Shortcut> GetShortcuts();
        /// <summary>
        /// 
        /// </summary>
        /// <param name="module"></param>
        /// <returns></returns>
        bool RemoveShortcut(SystemNavModule module);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="keyword"></param>
        /// <returns></returns>
        IEnumerable<SystemNavModule> SearchModules(string keyword);
    }

}
